package com.dujiabao.dex.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import com.dujiabao.dex.example.service.DelayJobApi;

import lombok.extern.slf4j.Slf4j;
import ltd.dujiabao.dex.core.registrar.EnableDelayJob;

/**
 * @author DuJiabao
 * @date 2024/3/18 19:53
 */
@Slf4j
@SpringBootApplication
@EnableDelayJob
public class ExampleApplication {
    public static void main(String[] args) throws InterruptedException {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ExampleApplication.class, args);
        DelayJobApi api = applicationContext.getBean(DelayJobApi.class);
        api.job();
        api.job(1);
        api.job(1L);
        api.job1(2, "111");
        Thread.sleep(2000);
        api.job(1L);
    }
}
